#!/usr/bin/env bash
#
model_path=/nasdata/atp/data/panjinquan/Project/LLM/MLLM-Factory/output/MiniCPM-V-4_5
model_path=/home/PKing/nasdata/Project/LLM/MLLM-Factory/output/MiniCPM-V-4_5
python ./tools/mtmd/legacy-models/minicpmv-surgery.py -m $model_path

python ./tools/mtmd/legacy-models/minicpmv-convert-image-encoder-to-gguf.py -m $model_path --minicpmv-projector $model_path/minicpmv.projector --output-dir $model_path/ --minicpmv_version 6

python ./convert_hf_to_gguf.py $model_path/model

# int4 量化版本
./llama-quantize $model_path/model/Model-3.6B-F16.gguf $model_path/model/ggml-model-Q4_K_M.gguf Q4_K_M
./llama-quantize $model_path/model/Model-8.2B-F16.gguf $model_path/model/ggml-model-Q4_K_M.gguf Q4_K_M